package pta.MOOC.ch02.ex07;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x =0;
        int y = 0;
        for (int i = 0; i < n; i++) {
            int num = scanner.nextInt();
                    if(n%2==0){
                        y += num;
                    } else {
                        x += num;
                    }
        }
        System.out.println("奇数和=" + x + ", 偶数和=" + y);
        scanner.close();
    }
}
